package org.wyy.vm.utils;

import javax.swing.JFileChooser;
import javax.swing.JFrame;

public class MyFileChooser {
	
	public static String fileUpload(JFrame jFrame) {
		String path = null;
		JFileChooser imgChooser = new JFileChooser();
		imgChooser.setDialogTitle("请选择要上传的文件...");
		imgChooser.setApproveButtonText("确定");
		imgChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
		if (JFileChooser.APPROVE_OPTION == imgChooser.showOpenDialog(jFrame)) {
			path = imgChooser.getSelectedFile().getPath();
		}
		return path;
	}

}
